//
//  UploadStatusView.m
//  carcareIOS
//
//  Created by tianxing on 16/1/26.
//  Copyright © 2016年 baozun. All rights reserved.
//

#import "UploadStatusView.h"

@interface UploadStatusView()

@property (nonatomic , strong) UIImageView * statusImage;

@property (nonatomic , strong) UILabel * titleLabel;

@end

@implementation UploadStatusView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame withImageName:(NSString *)imageStr withTitle:(NSString *)tipsStr{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.backgroundColor = [UIColor whiteColor];
        self.statusImage = [Factory imageViewWithCenter:CGPointMake(self.center.x, 50 * __MAIN_RATIO_H_667) image:ImageNamed(imageStr) onView:self];
        self.titleLabel = [Factory labelWithFrame:CGRectMake(0, 0, 200 * __MAIN_RATIO_375, 30 * __MAIN_RATIO_H_667) font:FONT_DEFAULT_Light(18 * __MAIN_RATIO_375) text:tipsStr textColor:COLOR_HEXSTRING(@"#37BED6") onView:self textAlignment:NSTextAlignmentCenter];
        self.titleLabel.center = CGPointMake(self.center.x, self.statusImage.bottom + 22 * __MAIN_RATIO_H_667);
    }
    return self;
}
- (void)changeImageName:(NSString *)imageStr withTitle:(NSString *)tipsStr
{
    self.statusImage.image = ImageNamed(imageStr);
    self.titleLabel.text = tipsStr;
}

@end
